<template>
  <div class="tm-radio">
    <el-radio-group v-model="currValue">
      <el-radio-button v-for="item in data"
                       :label="item.value"
                       :key="item.value">{{ item.label }}</el-radio-button>
    </el-radio-group>
  </div>
</template>

<script>
export default {
  name: 'tm-radio',
  cnName: 'tm-radio',
  props: {
    value: [String, Number],
    data: Array
  },
  data() {
    return {}
  },
  computed: {
    currValue: {
      get() {
        return this.value
      },
      set(val) {
        this.$emit('input', val)
      }
    }
  },
  methods: {}
}
</script>

<style lang="less" scoped>
.tm-radio {
}
</style>
